package Campus.help.common.config;


import Campus.help.common.vo.UserInfoVo;
import org.springframework.stereotype.Component;

@Component
public class MyThreadLocal{
    private static final ThreadLocal<UserInfoVo> THREAD_LOCAL = new ThreadLocal<>();

    public UserInfoVo get(){
        return THREAD_LOCAL.get();
    }

    public void set(UserInfoVo userInfo){
         THREAD_LOCAL.set(userInfo);
    }

    public void remove(){
        THREAD_LOCAL.remove();
    }

}
